import socket

# 创建socket对象
udp_socket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
localaddr = ('10.27.57.84',8088)
udp_socket.bind(localaddr)

# 接受数据
recv_data = udp_socket.recvfrom(1024)
recv_msg = recv_data[0]
send_addr = recv_data[1]

print(f'发送人{send_addr}：{recv_msg.decode("utf-8")}')

# 关闭socket对象
udp_socket.close()